{extend name="wap/b2c/base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/order.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/pro-detail.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/payment_order_new.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/payment_order_popup.css">
{/block}

{block name="goodsHead"}
<section class="head">
	<a class="head_back" href="APP_MAIN"><i class="icon-back"></i></a>
	<div class="head-title">订单结算</div>
</section>
{/block}
 
{block name="main"}
<input type="hidden" id="goodslist" value="{$goods_sku_list}">
<div class="h50"></div>
<div>
	{if condition="$address_default.id neq ''"}
	<div id="addressok" onload="opener.location.reload()">
		<input type="hidden" id="addressid" value="{$address_default.id}">
		<div class="js-order-address express-panel js-edit-address express-panel-edit">
			<ul class="express-detail">
				<a href="APP_MAIN/Member/memberAddress.html?url=cart">
					<li class="clearfix">
						<span class="name">收货人：{$address_default.consigner}</span>
						<span class="tel">{$address_default.mobile}</span>
					</li>
					<li class="address-detail">收货地址：{$address_default.address_info}-{$address_default.address}</li>
				</a>
			</ul>
		</div>
	</div>
	{else /}
	<div class="empty-address-tip">
		<div id="noaddress"><a href="APP_MAIN/Member/memberAddress.html">新增收货地址</a></div>
	</div>
	{/if}
	<div class="block-item express" style="padding: 0;"></div>
	<section class="cart-prolist">
<!-- 		<div class="header"><a href="#">{$shopname}</a></div> -->
		{foreach name="itemlist" item="list"}
		<div class="order-goods-item clearfix">
			<div class="name-card block-item">
				<a href="APP_MAIN/goods/goodsDetail?id={$list.goods_id}" class="thumb">
					<img src="__ROOT__/{$list['picture_info']['pic_cover_micro']}" alt="{$list.goods_name}" />
				</a>
				<div class="detail">
					<div class="clearfix detail-row">
						<div class="right-col">
							<input type="hidden" name="goods_skuid" value="{$list.sku_id}">
							<input type="hidden" name="goods_point_exchange"/>
							￥<span>{$list.price}
							{if condition="$list.point_exchange_type==1 "}
								{if condition=" $list.point_exchange>0"}
									+{$list.point_exchange}积分
								{/if}
							{/if}
							</span>
						</div>
						<div class="left-col">
							<h3>
								<a href="javascript:;">{$list.goods_name}</a>
							</h3>
						</div>
					</div>
					<div class="clearfix detail-row">
						<div class="right-col">
							<div class=" c-gray-darker">
								×<span>{$list.num}</span>
							</div>
						</div>
						<div class="left-col">
							<p class="c-gray-darker">{if condition="$list['sku_name'] neq '0'"}{$list.sku_name}{/if}</p>
						</div>
					</div>
				</div>
			</div>
		</div>
		{/foreach}
		<div>
			<div id="express_method">
				<div>配送方式</div>
				<div>
					<a class="active" href="javascript:void(0);" value="1">快递发货</a>
<!-- 					<i class="right-arrow"></i> -->
				</div>
			</div>
			<div class="remarks">
				<div>买家留言：</div>
				<textarea id="leavemessage" placeholder="给卖家留言"></textarea>
			</div>
		</div>
		<!-- 此处删除部分信息 -->
		<div class="total">
			<span class="float_left">商品合计：</span>
			<i style="color: red; font-size: 15px;">￥</i>
			<span id="orderprice" class="total-price">{$count_money}</span>
		</div>
		
		{if condition="$count_point_exchange>0 "}
			<div class="total">
				<span class="float_left">可用积分：<span style="color: gray;" >{$member_account.point}</span></span>
				<span class="total-price" data-point="{$count_point_exchange}" id="count_point_exchange">{$count_point_exchange}积分</span>
			</div>
		{/if}
	
		 <div class="total">
			<span class="float_left">可用余额：<span style="color: gray;" >￥{$member_account.balance}</span></span>
			<span>
				使用<input type="text" id="member_balance" data-max="{$member_account.balance}" placeholder="0"  />元<!-- onchange="calculate_youhui()" -->
			</span>
		</div>
		<div class="total">
			<span class="float_left">优惠券：</span>
			<span id="use_coupon" val="-1" money="0">不使用优惠券</span>
		</div>
		<div class="remarks">
			<input type="hidden" id="favorable" value="0">
			<input type="hidden" id="input_discount_money" value="{$discount_money}">
			<p>商品金额<span class="float_right" id="goods_total_money" money="{$count_money}">￥{$count_money}</span></p>
			<p>
				运费<span id="feeprice" money="{$express}" class="float_right">￥{$express}</span>
				<input type="hidden" id="is_calculate_express" value="{$is_calculate_express}">
				<input type="hidden" id="res_message" value="{$res_message}">
			</p>
			<p>
				总优惠<span class="float_right" id="discount_money">￥{$discount_money}</span>
			</p>
		</div>
	</section>
	
	<div class="footer" style="min-height: 86px;">
		<div class="copyright">
			<div class="ft-copyright">
				<a href="APP_MAIN" target="_blank">Niushop开源商城提供技术支持</a>
			</div>
		</div>
	</div>
	<div style="height: 50px"></div>
	<div class="order-total-pay bottom-fix">
		<div class="pay-container clearfix">
			<span class="c-gray-darker font-size-16">合计：</span>
			<span class="font-size-16 theme-price-color" id="realprice">￥0.00</span>
<!-- 			<span class="font-size-12 theme-price-color" id="realprice-decimal">00</span> -->
			{if condition="$count_point_exchange>0 "}
			<span class="font-size-16 theme-price-color" id="count-point">+{$count_point_exchange}积分</span>
			{/if}
			<input type="hidden" value="{$count_point_exchange}" id="hidden_use_integration" />
			<button class="commit-bill-btn" onclick="submitOrder(this)">提交订单</button>
		</div>
	</div>

	<div id="mask-layer"></div>
	<div id="popup-preferential" class="coupon-popup">
		<div class="js-scene-coupon-list">
			<div class="header">
				选择优惠<span class="js-close close"></span>
			</div>
			<div class="block block-list border-0">
				<ul class="js-coupon-list coupon-list">
					<li class="block-item coupon-item active">
						<div class="label-check-img" style="top:9px;"></div>
						<div class="coupon-info" style="line-height: 30px;height: 30px;">
							<a href="javascript:;" onclick="useCoupon(this,-1)">不使用优惠卷</a>
						</div>
					</li>
					{volist name="coupon_list" id="coupon"}
					<li class="block-item coupon-item ">
						<div class="label-check-img"></div>
						<div class="coupon-info">
							<a href="javascript:;" onclick="useCoupon(this,{$coupon['coupon_id']},&#39;{$coupon['coupon_code']}&#39;,{$coupon['money']})">
								<p class="font-size-12">{$coupon['coupon_code']}<em class="pull-right">{$coupon['money']}元</em></p>
								<p class="font-size-12 c-gray-darker">下单立减{$coupon['money']}元</p>
							</a>
						</div>
					</li>
					{/volist}
				</ul>
			</div>
		</div>
		<div class="coupon-action-container">
			<button class="btn-green" style="margin: 0px;">确定</button>
		</div>
	</div>
</div>
{/block}
{block name="bottom"}{/block}
{block name="javascript"}
<script type="text/javascript" src="__TEMP__/{$style}/public/js/payment_order.js"></script>
<script type="text/javascript">
var __IMG__ = '__TEMP__/{$style}/public/images';
</script>
{/block}